-
Notifications
You must be signed in to change notification settings - Fork 745
/
RoleProvider.cs
79 lines (57 loc) · 2.57 KB
/
RoleProvider.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information
namespace DotNetNuke.Security.Roles
{
using System;
using System.Collections;
using System.Collections.Generic;
using DotNetNuke.ComponentModel;
using DotNetNuke.Entities.Users;
public abstract class RoleProvider
{
// return the provider
public static RoleProvider Instance()
{
return ComponentFactory.GetComponent<RoleProvider>();
}
public virtual bool CreateRole(RoleInfo role)
{
throw new NotImplementedException();
}
public virtual void DeleteRole(RoleInfo role)
{
throw new NotImplementedException();
}
public abstract ArrayList GetRoles(int portalId);
public abstract IList<RoleInfo> GetRolesBasicSearch(int portalID, int pageSize, string filterBy);
public virtual IDictionary<string, string> GetRoleSettings(int roleId)
{
return new Dictionary<string, string>();
}
public abstract void UpdateRole(RoleInfo role);
public virtual void UpdateRoleSettings(RoleInfo role)
{
}
// Role Groups
public abstract int CreateRoleGroup(RoleGroupInfo roleGroup);
public abstract void DeleteRoleGroup(RoleGroupInfo roleGroup);
public abstract RoleGroupInfo GetRoleGroup(int portalId, int roleGroupId);
public abstract ArrayList GetRoleGroups(int portalId);
public abstract void UpdateRoleGroup(RoleGroupInfo roleGroup);
public abstract bool AddUserToRole(int portalId, UserInfo user, UserRoleInfo userRole);
public abstract UserRoleInfo GetUserRole(int portalId, int userId, int roleId);
public abstract ArrayList GetUserRoles(int portalId, string username, string rolename);
public abstract ArrayList GetUsersByRoleName(int portalId, string roleName);
public abstract void RemoveUserFromRole(int portalId, UserInfo user, UserRoleInfo userRole);
public abstract void UpdateUserRole(UserRoleInfo userRole);
public virtual RoleGroupInfo GetRoleGroupByName(int portalID, string roleGroupName)
{
return null;
}
public virtual IList<UserRoleInfo> GetUserRoles(UserInfo user, bool includePrivate)
{
throw new NotImplementedException();
}
}
}